package {
	import flash.display.*;
	import flash.display3D.VertexBuffer3D;
	import flash.geom.Point;
	import flash.geom.Rectangle;
	import flash.geom.Vector3D;
	import flash.utils.*;
	import flash.text.*;
	import flash.system.System;
	
	public class vectVSbool extends Sprite {
		
		private var __logger:TextField = new TextField();
		private var s:String = "";
		
		private function row(...cols):void {
			__logger.appendText(cols.join(", ") + "\n");
		}
		
		private var bool:Boolean = true;
		private var v3D:Vector3D = new Vector3D(1, 2, 3, 4);
		private var obj:Object = new Object;
			
		public function vectVSbool() {
			__logger.autoSize = TextFieldAutoSize.LEFT;
			addChild(__logger);
			
			var tempV:Vector3D = new Vector3D;
			var tempBool:Boolean;
			var tempObj:Object = new Object;
			
			
			obj.cameraScaleX = 1.2;
			obj.cameraScaleY = 1.2;
			obj.screen = 5;
			
			
			var beforeTime:int;
			var afterTime:int;
			var castTime:int;
			var i:uint;
			var len:uint = 10000000;
			trace("itterations: " + len);
			
			
			beforeTime = getTimer();
			for (i = 0; i < len; ++i) {
				tempV.x = v3D.x;
				
			}
			afterTime = getTimer();
			castTime = afterTime - beforeTime;
			row("v3d ", castTime);
			
			
			beforeTime = getTimer();
			for (i = 0; i < len; ++i) {
				tempBool = bool;
				
			}
			afterTime = getTimer();
			castTime = afterTime - beforeTime;
			row("bool ", castTime);
			
			
			beforeTime = getTimer();
			for (i = 0; i < len; ++i) {
				tempObj.cameraScale = obj.cameraScale;
				
			}
			afterTime = getTimer();
			castTime = afterTime - beforeTime;
			row("Obj ", castTime);
			
		}
		
		private function someVector3D():Vector3D {
			return v3D;
		}
		
		private function someBoolean():Boolean {
			return bool;
		}
		
		private function someObj():Object {
			return obj;
		}
	}
}
